Skip to content

Tests: make dataproviders static - #255

Merged
jrfnl merged 1 commit into
masterfrom
feature/tests-static-dataproviders
Jan 11, 2024
Merged

jrfnl merged 1 commit into
masterfrom
feature/tests-static-dataproviders

Conversation

@jrfnl

@jrfnl jrfnl commented Jan 11, 2024

Copy link
Copy Markdown
Member

Description

As of PHPUnit 10, data providers are (again) expected to be static methods. While the test suite does not (yet) support PHPUnit 10, it's still not a bad idea to already start complying with this.

Suggested changelog entry

N/A

Related issues/external references

Loosely related to #25

As of PHPUnit 10, data providers are (again) expected to be `static` methods.
While the test suite does not (yet) support PHPUnit 10, it's still not a bad idea to already start complying with this.
@jrfnl jrfnl added this to the 3.8.x Next milestone Jan 11, 2024
@jrfnl
jrfnl merged commit 1703a6b into master Jan 11, 2024
@jrfnl
jrfnl deleted the feature/tests-static-dataproviders branch January 11, 2024 23:26
@jrfnl jrfnl modified the milestones: 3.8.x Next, 3.9.0 Jan 19, 2024
rodrigoprimo added a commit to rodrigoprimo/PHPCSDevTools that referenced this pull request Apr 11, 2025
Per the PHPUnit manual: "A data provider method must be public and static" (https://docs.phpunit.de/en/12.0/writing-tests-for-phpunit.html).

A similar change was done in the PHPCS repository: PHPCSStandards/PHP_CodeSniffer#255
rodrigoprimo added a commit to rodrigoprimo/PHPCSDevTools that referenced this pull request Apr 11, 2025
Per the PHPUnit manual: "A data provider method must be public and static" (https://docs.phpunit.de/en/12.0/writing-tests-for-phpunit.html).

A similar change was done in the PHPCS repository: PHPCSStandards/PHP_CodeSniffer#255

Tests will continue to work when running with PHPUnit < 10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant